package pkmn.nature;

import java.util.Random;

public enum Nature {

    hardy, lonely, brave, adamant, naughty, bold, docile, relaxed, impish, lax,
    timid, hasty, serious, jolly, naive, modest, mild, quiet, bashful, rash, calm,
    gentle, sassy, careful, quirky;

    /**
     * Return a random Nature
     * @return Nature
     */
    public static Nature random() {
        Nature[] nature = {hardy, lonely, brave, adamant, naughty, bold, docile,
            relaxed, impish, lax, timid, hasty, serious, jolly,
            naive, modest, mild, quiet, bashful, rash, calm,
            gentle, sassy, careful, quirky};
        return nature[new Random().nextInt(nature.length)];
    }

    /**
     * Return a bonus attack percent by Nature
     * @param nature Nature
     * @return int
     */
    public static int attackBonus(Nature nature) {
        switch (nature) {
            case hardy:
                return 61;
            case lonely:
                return 20;
            case brave:
                return 70;
            case adamant:
                return 38;
            case naughty:
                return 20;
            case bold:
                return 30;
            case docile:
                return 56;
            case relaxed:
                return 25;
            case impish:
                return 69;
            case lax:
                return 35;
            case timid:
                return 62;
            case hasty:
                return 58;
            case serious:
                return 34;
            case jolly:
                return 35;
            case naive:
                return 56;
            case modest:
                return 35;
            case mild:
                return 44;
            case quiet:
                return 56;
            case bashful:
                return 30;
            case rash:
                return 30;
            case calm:
                return 40;
            case gentle:
                return 18;
            case sassy:
                return 88;
            case careful:
                return 42;
            case quirky:
                return 56;
            default:
                return 0;
        }
    }

    /**
     * Return a bonus deffense percent by Nature
     * @param nature Nature
     * @return int
     */
    public static int defenseBonus(Nature nature) {
        switch (nature) {
            case hardy:
                return 7;
            case lonely:
                return 25;
            case brave:
                return 15;
            case adamant:
                return 31;
            case naughty:
                return 70;
            case bold:
                return 20;
            case docile:
                return 22;
            case relaxed:
                return 15;
            case impish:
                return 6;
            case lax:
                return 10;
            case timid:
                return 10;
            case hasty:
                return 37;
            case serious:
                return 11;
            case jolly:
                return 5;
            case naive:
                return 22;
            case modest:
                return 45;
            case mild:
                return 50;
            case quiet:
                return 22;
            case bashful:
                return 58;
            case rash:
                return 13;
            case calm:
                return 50;
            case gentle:
                return 70;
            case sassy:
                return 6;
            case careful:
                return 50;
            case quirky:
                return 22;
            default:
                return 0;
        }
    }
}
